package kitty.main;

import android.graphics.BitmapFactory;

import com.example.kittyvszombie.R;

public class StarKitty extends Kitty {

	public StarKitty(MainView view, int row, float x, float y) {
		this.view = view;
		this.row = row;
		projectiles = view.getProjectiles();
		stars = view.getStars();
		attackTimer = 100;
		this.x = x;
		this.y = y;

		kittyImage = BitmapFactory.decodeResource(view.getResources(),
				R.drawable.starkitty);
		deadImage = BitmapFactory.decodeResource(view.getResources(),
				R.drawable.starkitty_dead);
		rateOfFire = 5.0f;
		image = kittyImage;
	}

	@Override
	public void update() {
		
		updateAttackTime();
		
		if (attack && !dead) {
			stars.add(new Star(view, x, y + 50));
			attack = false;
		}
	}
}